package com.yc.spring.mvc.web;

import javax.servlet.*;
import java.io.IOException;

public class SevletFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        //请求到达目标资源之前执行的代码

        //执行过滤链方法
        filterChain.doFilter(servletRequest,servletResponse);

        //请求从目标资源返回执行的代码



    }

    @Override
    public void destroy() {

    }
}
